/**
 *测试用例cfg覆盖模型
 */
const mongoose = require('mongoose');
const schemaDefinition = require('./schema/test-case-covered-field');
const schemaInstance = mongoose.Schema(schemaDefinition);
schemaInstance.index({ functionId: 1, testcaseId: 1 }, { unique: true });
const modelInstance = mongoose.model('test-case-covered-field', schemaInstance);
mongoose.connection.on('open', () => modelInstance.syncIndexes().catch(() => {}));

/**
 * Export model definition object.
 */
module.exports = modelInstance;
